import layoutHeaderAside from '@/layout/header-aside'
const meta = {
	auth: true
}
export default{
	path: '/admin',
	name: 'admin',
	meta,
	redirect: {
		name: 'admin'
	},
	component: layoutHeaderAside,
	children:(pre=>[
		//订单管理
		{
			path: 'order',
			name: '${pre}order',
			component: () => import('@/pages/order'),
			meta: { ...meta,
				title: '订单管理'
			}
		},
		/* 商城管理 */
		//分类
		{
			path:'class',
			name:'${pre}class',
			component:()=>import('@/pages/class'),
			meta:{...meta,
				title:'分类管理'
			}
		},
		//商品
		{
			path:'commodity',
			name:'${pre}commodity',
			component:()=>import('@/pages/commodity'),
			meta:{...meta,
				title:'商品管理'
			}
		}, 
		//商品 套餐管理
		{
			path:'setMeal',
			name:'${pre}setMeal',
			component:()=>import('@/pages/setMeal'),
			meta:{...meta,
				title:'套餐管理'
			}
		},
		//自选套餐
		{
			path:'optionPack',
			name:'${pre}setMeal',
			component:()=>import('@/pages/optionPack'),
			meta:{...meta,
				title:'自选套餐'
			}
		},
		/* 充值管理 */
		//在线冲值设置
		{
			path:'payManage',
			name:'${per}payManage',
			component:()=>import('@/pages/payManage'),
			meta:{...meta,
				title:'在线充值'
			}
		},
		//充值记录
		{
			path:'payRecord',
			name:'${per}payRecord',
			component:()=>import('@/pages/payRecord'),
			meta:{...meta,
				title:'充值记录'
			}
		},
		// 优惠卷
		{
			path:'Coupon',
			name:'${per}Coupon',
			component:()=>import('@/pages/Coupon'),
			meta:{...meta,
				title:'优惠卷'
			}
		},
		// 用户管理
		{
			path:'user',
			name:'${per}user',
			component:()=>import('@/pages/user'),
			meta:{...meta,
				title:'用户管理'
			}
		},
		/* 系统设置 */
		//联系客服
		{
			path:'contact',
			name:'${per}contact',
			component:()=>import('@/pages/contact'),
			meta:{...meta,
				title:'联系客服'
			}
		},
		//配送费
		{
			path:'delivery',
			name:'${per}delivery',
			component:()=>import('@/pages/delivery'),
			meta:{...meta,
				title:'配送条件'
			}
		},
		/* 人员管理 */
		{
			path:'personnel',
			name:'${per}personnel',
			component:()=>import('@/pages/personnel'),
			meta:{...meta,
				title:'人员管理'
			}
		},
		//轮播图
		{
			path:'banner',
			name:'${per}banner',
			component:()=>import('@/pages/banner'),
			meta:{...meta,
				title:'轮播图'
			}
		},
	])('admin-')
	
}